home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
L' Effet Pommier 3
/
L'Effet Pommier - Volume 03.iso
/
Programmation
/
Gooey1.3.1
/
Docs & Compile Hints
/
THINK C 7.0 Hints
< prev
next >
Wrap
Text File
|
1995-02-06
|
6KB
|
186 lines
THINK C 7.0
There is a file named "Symantec Setup" in the "C Templates folder. Delete the file
named "Setup" in this folder. Make a copy of the "Symantec Setup" file and then
rename this copy to "Setup".
This will make sure that the file types of the source code generated is the correct
creator, so Metrowerks will be launched automatically when double-clicking on one
of these files.
After generating code for the first time, for your new prototype, follow this method to
get THINK C up and working for you:
CREATING A THINK PROJECT...
Ñ Find the 'Sources" folder made by the Code Generator.
Ñ Open the "Sources" folder.
Ñ Open the "mm" folder inside the "Sources" folder.
Ñ Double click on any of the files you see there, this will automatically launch THINK C.
Ñ Select the "New Project" menu item.
Ñ Select the "Empty Project" type and uncheck the "Create folder" checkbox.
Ñ╩When THINK C brings up a save dialog, it is asking you to name the new THINK C project
you are making. Change the folder level to one up, the "Sources" folder instead of the
"mm" folder. Now enter your project name, using Option-P for the "╣" part of the name,
e.g. MyProgram.╣
Ñ Close the one file that THINK C opened for you.
Ñ Select the project window.
ADDING Gooey SPECIFIC FILES...
Ñ Click on the "main.c" file to select it. This will put the added sources into that
segment.
Ñ Under the "Source" menu, select the "Add Files..." menu item.
Ñ Open the "mm" folder, from the Add dialog.
Ñ Press the "Add All" button, this will select every file in this "mm" dialog.
Ñ Press the "Done" button, this will now add them all to your project.
Ñ╩Make the project window taller if necessary, for extra empty space at the bottom.
Ñ Click on the "main.c" file to select it. Under the "Source" menu select the
"Remove" menu item.
Ñ Press the mouse below the "Totals" message line. This selects a new segment for the next
files to go into.
ADDING user SPECIFIC FILES...
Ñ Under the "Source" menu, select the "Add Files..." menu item.
Ñ Go up one level, from the "mm" folder into the "Source" folder.
Ñ Open the "resources" folder, from the Add dialog.
Ñ Select the file starting with "Rez_" and ending in ".r". This is the Rez file.
Ñ Press the "Add" button.
Ñ Go up one level, from the "resources" folder into the "Sources" folder.
Ñ Open the "u" folder, from the Add dialog.
Ñ Press the "Add All" button, this will select every file in this "u" dialog.
Ñ Press the "Done" button, this will now add them all to your project.
ADDING THINK LIBRARIES...
Ñ Press the mouse on the "MacTraps" file. This selects a new segment for the next
files to go into.
Ñ Under the "Source" menu, select the "Add Files..." menu item.
Ñ Locate your THINK C folder. Locate the "Mac Libraries" folder, open it up.
Ñ Select "MacTraps2" and press the "Add" button.
Ñ Press the "Done" button, this will now add them all to your project.
SETTING UP THE PROJECT...
Ñ Under the "Project" menu, select the "Set Project Type..." menu item.
Ñ Change the partition size to something larger, like 1024K.
Ñ Change the "SIZE Flags" to be "5A80" to start off with.
Ñ╩Press the "OK" button.
Ñ Set all your THINK C preferences, I recommend turning on "Require Prototypes".
PRECOMPILED HEADERS...
Ñ Open the "mmHeaders.c" file. Click on this file to select it.
Ñ Under the "Source" menu select the "Precompile╔" menu item.
Ñ Save the precompiled headers under the "mmHeaders68K" name.
Ñ Close the "mmHeaders.c"file.
Ñ Set your THINK C prefix preferences to say:
#include "mmHeaders68K"
Ñ Under the "Project" menu, select the "Bring Up To Date" menu item. This will compile
all the files.
Ñ For 68K only. If the main segment, the top one, is larger than 32K then create new
segments and drag some of the files into it.
Ñ Under the "Project" menu, select the "Check Link" menu item. This will tell you if
any files are missing.
CODING...
Ñ Make your changes to any file that does not start with "mm". All the other files hook
into the "mm" files to provide you with access.
RE-GENERATION. After making changes or additions to your prototype.
Ñ Generate all sources again. This will make a new folder named "Sources" or "Sources"
with a number after it if that folder alreay exists.
Ñ Drag the "mm" folder from the newly generated folder into your working folder.
NOTE: This replaces your older "mm" folder. If you have made changes to any "mm" files,
you should never need to, then drag them into another folder first.
Ñ Drag the "mmXXX.rsrc" file from the new "resources" folder into your working "resources"
folder.
Ñ Drag the "XXXX.╣.rsrc" file from your "Sources" folder into the trash can, you want
THINK C to make a new one using the new resource file.
Ñ Empty the trash.
If you added a new Window, Dialog, or Alert then drag that corresponding file from the new
"u" folder into your working "u" folder. If you are asked about replacing a file then
say "No", you got the wrong file.
If you added a menu then open your "menuXXX.h" file and the new "menuXXX.h". Copy over the
prototype for the new menu. Open your "menuXXX.c" file and the new "menuXXX.c". Copy over
the routine for the new menu.
If you added a button or other control then let THINK find any additional routines for you,
in error messages.
Ñ Under the "Project" menu, select the "Remove Objects" menu item. This will make sure that
all files will be recompiled.
Ñ Under the "Project" menu, select the "Bring Up To Date" menu item. This will compile all
the files.
If there are errors involving new routines, like a checkbox handler routine where there were
no check boxes before. Open the old corresponding "xxx.h" file, from the "u" folder. Open
the new "xxx.h" file, copy the new prototype over. Open the "xxx.c" files and copy over
the new routine.